home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gui / mui23dev.lha / MUI / Developer / Autodocs / MUI_Text.doc < prev    next >
Text File  |  1994-12-23  |  5KB  |  173 lines

  1. TABLE OF CONTENTS
  2.  
  3. Text.mui/Text.mui
  4. Text.mui/MUIA_Text_Contents
  5. Text.mui/MUIA_Text_HiChar
  6. Text.mui/MUIA_Text_PreParse
  7. Text.mui/MUIA_Text_SetMax
  8. Text.mui/MUIA_Text_SetMin
  9. Text.mui/Text.mui
  10.  
  11.     Text class allows generating objects that contain
  12.     some kind of text. You can control the outfit of
  13.     your text with some special control characters,
  14.     including italics, bold, underline and color
  15.     codes. Format codes align text either left,
  16.     centered or right, linefeeds allow multiline
  17.     text fields.
  18. Text.mui/MUIA_Text_Contents
  19.  
  20.     NAME
  21.     MUIA_Text_Contents -- (V4 ) [ISG], STRPTR
  22.  
  23.     FUNCTION
  24.     String to be displayed in a text object.
  25.  
  26.     If the string is larger than available display space,
  27.     it will be clipped. Setting MUIA_Text_Contents to NULL
  28.     results in an empty text object.
  29.  
  30.     The string is copied into a private buffer, you can destroy
  31.     the original after using this tag.
  32.  
  33.     Whenever MUI prints strings, they may contain some special
  34.     character sequences defining format, color and style of the text.
  35.  
  36.     '\n'     Start a new line. With this character you can e.g. create
  37.          multi line buttons.
  38.  
  39.     ESC -    Disable text engine, following chars will be printed
  40.              without further parsing.
  41.  
  42.     ESC u    Set the soft style to underline.
  43.  
  44.     ESC b    Set the soft style to bold.
  45.  
  46.     ESC i    Set the soft style to italic.
  47.  
  48.     ESC n    Set the soft style back to normal.
  49.  
  50.     ESC <n>  Use pen number n (2..9) as front pen. n must be a valid
  51.          DrawInfo pen as specified in "intuition/screens.h".
  52.  
  53.     ESC c    Center current (and following) line(s).
  54.          This sequence is only valid at the beginning of a
  55.          string or after a newline character.
  56.  
  57.     ESC r    Right justify current (and following) line(s).
  58.          This sequence is only valid at the beginning of a
  59.          string or after a newline character.
  60.  
  61.     ESC l    Left justify current (and following) line(s).
  62.          This sequence is only valid at the beginning of a
  63.          string or after a newline character.
  64.  
  65.     ESC I[s] Draw MUI image with specification <s>. See autodocs
  66.              of image class for image spec definition.
  67.  
  68.     Note:     These rules apply to all MUI strings, not only to
  69.          a text objects contents. You can e.g. format the
  70.              columns of a listview or include images in a cycle
  71.              gadgets entries.
  72.  
  73.     EXAMPLE
  74.     ...
  75.     MUIA_Text_Contents, "\33c\33bMUI\33n\nis magic"
  76.     ...
  77.  
  78.     would look like     |    MUI   |  <-- bold
  79.                         | is magic |  <-- normal
  80.  
  81.     SEE_ALSO
  82.     MUIA_Text_SetMin, MUIA_Text_SetMax, MUIA_Text_PreParse
  83. Text.mui/MUIA_Text_HiChar
  84.  
  85.     NAME
  86.     MUIA_Text_HiChar -- (V4 ) [I..], char
  87.  
  88.     FUNCTION
  89.     If the character given here exists in the displayed
  90.     string (no matter if upper or lower case), it will
  91.     be underlined. This makes it easy to create macros
  92.     such as KeyButton() that specify the control char
  93.     and the underline char at the same time.
  94.  
  95.     SEE ALSO
  96.     MUIA_Text_Contents, MUIA_Control_Char
  97. Text.mui/MUIA_Text_PreParse
  98.  
  99.     NAME
  100.     MUIA_Text_PreParse -- (V4 ) [ISG], STRPTR
  101.  
  102.     FUNCTION
  103.     String containing format definitions to be parsed before
  104.     the text from MUIA_Text_Contents is printed.
  105.  
  106.     Using this tag, you can easily define different formats,
  107.     colors and styles without modifying the original string.
  108.  
  109.     EXAMPLE
  110.     ...
  111.     MUIA_Text_PreParse, "\33c\33i",   // centered and italics
  112.     MUIA_Text_Contents, "foobar",
  113.     ...
  114.  
  115.     SEE_ALSO
  116.     MUIA_Text_Contents
  117. Text.mui/MUIA_Text_SetMax
  118.  
  119.     NAME
  120.     MUIA_Text_SetMax -- (V4 ) [I..], BOOL
  121.  
  122.     FUNCTION
  123.     Boolean value to indicate wether the objects maximal width
  124.     shall be calculated to fit the string given with
  125.     MUIA_Text_Contents.
  126.  
  127.     When set to FALSE, maximum width is not limited.
  128.  
  129.     For a text object that needs to be updated (e.g. some
  130.     information about your programs status) you would probably
  131.     set MUIA_Text_SetMax to FALSE to allow resizing of this
  132.     object.
  133.  
  134.     For a label for one of your gadgets, you might want to
  135.     give this tag a value of TRUE to prevent MUI from
  136.     inserting additional layout space.
  137.  
  138.     Defaults to FALSE.
  139.  
  140.     EXAMPLE
  141.     ...
  142.     TX_Status = TextObject,
  143.        RecessedFrame,
  144.        MUIA_Background   , MUII_BACKGROUND,
  145.        MUIA_Text_PreParse, "\33c",
  146.        MUIA_Text_Contents, "running...",
  147.        End,
  148.     ...
  149.     set(TX_Status,MUIA_Text_Contents,"reading...");
  150.     ...
  151.     set(TX_Status,MUIA_Text_Contents,"writing...");
  152.     ...
  153.  
  154.     SEE_ALSO
  155.     MUIA_Text_SetMin, MUIA_Text_Contents
  156. Text.mui/MUIA_Text_SetMin
  157.  
  158.     NAME
  159.     MUIA_Text_SetMin -- (V4 ) [I..], BOOL
  160.  
  161.     FUNCTION
  162.     Boolean value to indicate wether the objects minimal width
  163.     shall be calculated to fit the string given with
  164.     MUIA_Text_Contents.
  165.  
  166.     When set to FALSE, minimum width will be set to 0
  167.     and the displayed string may be clipped.
  168.  
  169.     Defaults to TRUE.
  170.  
  171.     SEE_ALSO
  172.     MUIA_Text_SetMax, MUIA_Text_Contents
  173.